package Modal;

import java.util.HashMap;
import java.util.Map;

public class ProductCategory {
    private Map<Integer, ProductDescription> map = new HashMap<>();

    public ProductCategory() {
        map.put(1, new ProductDescription(1, "铅笔", 0.5));
        map.put(2, new ProductDescription(2, "橡皮", 1.0));
        map.put(3, new ProductDescription(3, "尺子", 3.5));
        map.put(4, new ProductDescription(4, "笔记本", 5.0));
        map.put(5, new ProductDescription(5, "胶带", 2.0));
        map.put(6, new ProductDescription(6, "剪刀", 9.0));
    }

    public ProductDescription getProduct(int id) {
        return map.get(id);
    }
}
